package com.itcodai.utils.thread;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

/**
 * 利用线程池来创建线程
 * @author c-fanqj
 * @date 2023/5/17
 * @apiNote
 */
public class CreateThreadPoolTest implements Runnable {

    public static void main(String[] args) {
        ExecutorService executorService = Executors.newFixedThreadPool(10);
        executorService.execute(new CreateThreadPoolTest());
    }

    @Override
    public void run() {
        System.out.println("hello threadpool");
    }
}